#!/bin/bash

echo "Stopping all docker containers."
docker stop $(docker ps -a -q) 2>/dev/null
docker rm $(docker ps -a -q) 2>/dev/null
cur_dir=$PWD
for directory in lessons/*/services/*; do
    echo Running $directory
    cd $directory
    chmod +x dockerbuild.sh
    ./dockerrun.sh
    cd $cur_dir
done

